//
//  DeterrenceGuideView.m
//  safeLady
//
//  Created by hyu on 2016/12/14.
//  Copyright © 2016年 xmy. All rights reserved.
//

#import "DeterrenceGuideView.h"
#import "HandAnimation.h"

@interface DeterrenceGuideView()

@end

@implementation DeterrenceGuideView

-(void)awakeFromNib{
    [super awakeFromNib];
    [self showFristView];
    self.arrowImageView.animationImages = @[[UIImage imageNamed:@"arrowImg-1"],
                                                [UIImage imageNamed:@"arrowImg-2"],
                                                [UIImage imageNamed:@"arrowImg-3"],
                                                [UIImage imageNamed:@"arrowImg-2"]];
    self.arrowImageView.animationDuration = 0.8f;
    self.arrowImageView.animationRepeatCount = 0;
    [self.arrowImageView startAnimating];

}
- (IBAction)hiddenFristView:(UIButton *)sender {
    [self showSecondView];
}

- (IBAction)hiddenSecondView:(UIButton *)sender {
//    self.secondView.hidden = YES;
//    [self removeFromSuperview];
    [self hiddenAllView];
}

- (void)showFristView{
    self.fristView.hidden = NO;
    self.secondView.hidden = YES;
}

- (void)showSecondView{
    self.fristView.hidden = YES;
    self.secondView.hidden = NO;
}

- (void)hiddenAllView{
    self.fristView.hidden = YES;
    self.secondView.hidden = YES;
//    [self.arrowImageView stopAnimating];
    [self removeFromSuperview];
    [self.delegate overAction];
}

@end
